home *** CD-ROM | disk | FTP | other *** search
/ Cocktail Hour / image.iso / COCKTAIL.DIR / SShow_1_SlideShow Movie Script.ls < prev    next >
Encoding:
Text File  |  1997-03-05  |  4.5 KB  |  101 lines

  1. on slideShow direction
  2.   global gDirection0IsBack1IsFwd, gRecNumber, gCurrentSlideShow, gCurrentZone, gPictureSprite, gElevatorSprite, gScrollBarSprite, gSlideListCstNum, gTitleCstNum, gFirstPictureCstNum, gPictNumInOrder, gLinesNumber, gAutoMode
  3.   puppetSprite(gPictureSprite, 1)
  4.   set the itemDelimiter to ","
  5.   set gRecNumber to word 1 of item 2 of the text of member gSlideListCstNum of castLib "sshow"
  6.   if voidp(direction) then
  7.     set direction to gDirection0IsBack1IsFwd
  8.   end if
  9.   set newZone to 0
  10.   if direction and (gCurrentZone < gLinesNumber) then
  11.     set newZone to gCurrentZone + 1
  12.   else
  13.     if not direction and (gCurrentZone > 1) then
  14.       set newZone to gCurrentZone - 1
  15.     end if
  16.   end if
  17.   if (newZone <> gCurrentZone) and (newZone <> 0) then
  18.     set gCurrentZone to newZone
  19.     set the itemDelimiter to ","
  20.     set gPictNumInOrder to value(item gCurrentZone of the text of member "order" of castLib "sshow")
  21.     set the itemDelimiter to ","
  22.     set recLine to line gPictNumInOrder of the text of member gSlideListCstNum of castLib "sshow"
  23.     set gRecNumber to value(word 1 of item 2 of recLine)
  24.     delete word 1 of item 2 of recLine
  25.     set the text of member "cstType" of castLib "sshow" to item 4 of recLine
  26.     set the text of member "cstBase" of castLib "sshow" to item 6 of recLine
  27.     if item 5 of recLine = "hot" then
  28.       set tempNum to the number of member 8 of castLib "sshow"
  29.     end if
  30.     if item 5 of recLine = "long" then
  31.       set tempNum to the number of member 9 of castLib "sshow"
  32.     end if
  33.     if item 5 of recLine = "short" then
  34.       set tempNum to the number of member 10 of castLib "sshow"
  35.     end if
  36.     if item 5 of recLine = "shot" then
  37.       set tempNum to the number of member 11 of castLib "sshow"
  38.     end if
  39.     set the castNum of sprite 7 to tempNum
  40.     set the text of member gTitleCstNum of castLib "sshow" to item 1 of recLine
  41.     set tempCalc to gFirstPictureCstNum + gRecNumber - 1
  42.     set the castNum of sprite gPictureSprite to tempCalc
  43.     set transDirection to item direction + 1 of "back,forward"
  44.     updateStage()
  45.     updateScroll()
  46.   else
  47.     set gAutoMode to 0
  48.   end if
  49. end
  50.  
  51. on bringUpPict
  52.   global gCurrentSlideShow, gRecNumber, gCurrentZone, gPictureSprite, gElevatorSprite, gScrollBarSprite, gSlideListCstNum, gTitleCstNum, gFirstPictureCstNum, gPictNumInOrder, gLinesNumber
  53.   set the itemDelimiter to ","
  54.   set currScroll to the locH of sprite gElevatorSprite - the left of sprite gScrollBarSprite
  55.   set allListSize to gLinesNumber
  56.   set scrlSize to the right of sprite gScrollBarSprite - the left of sprite gScrollBarSprite
  57.   set gCurrentZone to currScroll * allListSize / scrlSize
  58.   if gCurrentZone = 0 then
  59.     set gCurrentZone to 1
  60.   end if
  61.   if gCurrentZone > gLinesNumber then
  62.     set gCurrentZone to gLinesNumber
  63.   end if
  64.   set the itemDelimiter to ","
  65.   set gPictNumInOrder to value(item gCurrentZone of the text of member "order" of castLib "sshow")
  66.   set the itemDelimiter to ","
  67.   set actualLine to line gPictNumInOrder of the text of member gSlideListCstNum of castLib "sshow"
  68.   set gRecNumber to value(word 1 of item 2 of actualLine)
  69.   set tempCalc to gFirstPictureCstNum + gRecNumber - 1
  70.   set the castNum of sprite gPictureSprite to member tempCalc of castLib "slidenw"
  71.   set the text of member gTitleCstNum of castLib "sshow" to item 1 of actualLine
  72.   set the text of member "cstType" of castLib "sshow" to item 4 of actualLine
  73.   set the text of member "cstBase" of castLib "sshow" to item 6 of actualLine
  74.   if item 5 of actualLine = "long" then
  75.     set tempNum to the number of member 9 of castLib "sshow"
  76.   end if
  77.   if item 5 of actualLine = "short" then
  78.     set tempNum to the number of member 10 of castLib "sshow"
  79.   end if
  80.   if item 5 of actualLine = "shot" then
  81.     set tempNum to the number of member 11 of castLib "sshow"
  82.   end if
  83.   if item 5 of actualLine = "hot" then
  84.     set tempNum to the number of member 11 of castLib "sshow"
  85.   end if
  86.   set the castNum of sprite 7 to tempNum
  87.   updateStage()
  88. end
  89.  
  90. on updateScroll
  91.   global gCurrentZone, gCurrentSlideShow, gPictureSprite, gElevatorSprite, gScrollBarSprite, gSlideListCstNum, gTitleCstNum, gFirstPictureCstNum, gLinesNumber
  92.   set allListSize to gLinesNumber
  93.   set scrlSize to the right of sprite gScrollBarSprite - the left of sprite gScrollBarSprite
  94.   set newLocH to gCurrentZone * scrlSize / allListSize
  95.   set the locH of sprite gElevatorSprite to newLocH + the left of sprite gScrollBarSprite
  96. end
  97.  
  98. on InitSlideWithSettings cocktailNum
  99.   duplicate(member cocktailNum of castLib "slidenw", member 200 of castLib "slidenw")
  100. end
  101.